import request from '@/utils/request'

// 查询打卡记录列表
export function listAttendance(query) {
  return request({
    url: '/app/attendance/list',
    method: 'get',
    params: query
  })
}

// 查询打卡记录详细
export function getAttendance(id) {
  return request({
    url: '/app/attendance/query/' + id,
    method: 'get'
  })
}

// 新增打卡记录
export function addAttendance(data) {
  return request({
    url: '/app/attendance/add',
    method: 'post',
    data: data
  })
}

// 修改打卡记录
export function updateAttendance(data) {
  return request({
    url: '/app/attendance/edit',
    method: 'post',
    data: data
  })
}

// 删除打卡记录
export function delAttendance(id) {
  return request({
    url: '/app/attendance/remove/' + id,
    method: 'delete'
  })
}

// 导出打卡记录
export function exportAttendance(query) {
  return request({
    url: '/app/attendance/export',
    method: 'get',
    params: query
  })
}
